import java.util.Scanner;
public class LoveSimulator {
    private LoveInterest loveInterest;

    public LoveSimulator(LoveInterest loveInterest) {
        this.loveInterest = loveInterest;
    }

    public void startSimulation() {
        Scanner scanner = new Scanner(System.in);
        boolean isRunning = true;

        while (isRunning) {
            loveInterest.updateStatus();
            System.out.println("What do you want to do?");
            System.out.println("1. 我喜欢你！");
            System.out.println("2. 傻逼");
            System.out.println("3. 扭头就走");
            System.out.println("4. Exit");

            int choice = scanner.nextInt();
            switch (choice) {
                case 1:
                    loveInterest.increaseHappiness(10);
                    System.out.println("你对他表白了，"+loveInterest.getName() +"表示很感动（好感+10）");
                    break;
                case 2:
                    loveInterest.decreaseHappiness(20);
                    System.out.println("你居然骂了 " + loveInterest.getName() + "傻逼，人家皱着眉头，但出于礼貌并没有骂人。（好感-20）");
                    break;
                case 3:
                    System.out.println("你直接扭头就走了， " + loveInterest.getName() + "表示很茫然，但也没说什么");
                    break;
                case 4:
                    System.out.println("Exiting the simulation...");
                    isRunning = false;
                    break;
                default:
                    System.out.println("Invalid choice. Please try again.");
            }
        }

        scanner.close();
    }

    public static void main(String[] args) {
        LoveInterest interest = new LoveInterest("霸道校霸（黄金版）");
        LoveSimulator simulator = new LoveSimulator(interest);
        simulator.startSimulation();
    }
}
